package com.factory.manager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.factory.common.bean.User;
import com.factory.common.core.BaseServiceImpl;
import com.factory.common.mapper.UserMapper;
import com.factory.manager.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    protected BaseMapper<User> getBaseMapper() {
        return userMapper;
    }

    @Override
    public Integer count() {
        return userMapper.selectCount(new QueryWrapper<User>().ge("status",0));
    }
}
